﻿
CREATE proc [CashSale].[GetCashSaleDetails]
@inCashSaleID	int
as
begin
	
	select	csd.DetailsID,
			csd.CashSaleID,
			csd.Price,
			csd.ProductID,
			p.ProductName,
			csd.Quantity,
			csd.RabattFix,
			csd.RabattPercent1,
			csd.RabattPercent2,
			csd.SalePrice,
			csd.TaxCode,
			tc.TaxRate,
			p.Unity
	from	CashSale.datCashSaleDetails csd
			inner join dbo.domTaxCodes tc on
				csd.TaxCode = tc.TaxCodeID
			inner join Products.datProducts p on
				p.ProductID = csd.ProductID
	where	csd.CashSaleID = @inCashSaleID
	

end

GO


